package com.tecode.service.songsheet;

import com.tecode.bean.MusicSongsheet;
import com.tecode.bean.Songsheet;

import java.util.List;
import java.util.Map;

public interface SongSheetService {
    //通过主键删除歌单
    int deleteByPrimaryKey(Integer songsheetid);

    int insert(Songsheet record);

    int insertSelective(Songsheet record);
    //主键查询歌单
    Songsheet selectByPrimaryKey(Integer songsheetid);

    int updateByPrimaryKeySelective(Songsheet record);

    int updateByPrimaryKey(Songsheet record);
    // 按访问量排序（多到少）
    List songsheetOrderByTrafficVolume();

    //按收藏量排序(多到少)
    List songsheetOrderByCollectionVolume();

    //按创建时间排序（后到前）
    List songsheetOrderByCreatetime();

    //歌单名查询
    List selectBySongsheetName(String songsheetName);

    //歌单名查询计数
    Integer countSelectBySongsheetName(String songsheetName);

    //通过拥有人昵称查询歌单
    List selectByUserNickname(String nickname);

    //通过歌单id查询该歌单包含的歌曲
    List selectMusicBySongSheetId(Integer songSheetId);

    //查询歌单总数
    Integer songSheetCount();

    //通过歌单id查询该歌单包含的歌曲总数
    Integer musicCountBySongSheetId(Integer songSheetId);

    //通过歌单编号查询歌单信息
    Map<String,Object> selectById(Integer id);

    /**
     * 搜索
     */
    List<Object> search(String searchName,String searchNickName);

    /**
     * 搜索计数
     */
    Integer countSeach(String searchName,String searchNickName);

    List getSongSheetTypes(Integer userId,Integer page);

    int saveSongSheet(Songsheet songsheet);

    List getSongSheetSongsBySongSheetId(Integer songSheetId,Integer page);

    int removeMusicSongSheet(MusicSongsheet musicSongsheet);
}
